Integrand size = 41, antiderivative size = 287 \[ \int \frac {\left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^4(c+d x)}{(a+a \cos (c+d x))^4} \, dx=-\frac {(44 A-21 B+8 C) \text {arctanh}(\sin (c+d x))}{2 a^4 d}+\frac {4 (454 A-216 B+83 C) \tan (c+d x)}{35 a^4 d}-\frac {(44 A-21 B+8 C) \sec (c+d x) \tan (c+d x)}{2 a^4 d}-\frac {(178 A-87 B+31 C) \sec ^2(c+d x) \tan (c+d x)}{105 a^4 d (1+\cos (c+d x))^2}-\frac {(44 A-21 B+8 C) \sec ^2(c+d x) \tan (c+d x)}{3 a^4 d (1+\cos (c+d x))}-\frac {(A-B+C) \sec ^2(c+d x) \tan (c+d x)}{7 d (a+a \cos (c+d x))^4}-\frac {(16 A-9 B+2 C) \sec ^2(c+d x) \tan (c+d x)}{35 a d (a+a \cos (c+d x))^3}+\frac {4 (454 A-216 B+83 C) \tan ^3(c+d x)}{105 a^4 d} \]
-1/2*(44*A-21*B+8*C)*arctanh(sin(d*x+c))/a^4/d+4/35*(454*A-216*B+83*C)*tan (d*x+c)/a^4/d-1/2*(44*A-21*B+8*C)*sec(d*x+c)*tan(d*x+c)/a^4/d-1/105*(178*A -87*B+31*C)*sec(d*x+c)^2*tan(d*x+c)/a^4/d/(1+cos(d*x+c))^2-1/3*(44*A-21*B+ 8*C)*sec(d*x+c)^2*tan(d*x+c)/a^4/d/(1+cos(d*x+c))-1/7*(A-B+C)*sec(d*x+c)^2 *tan(d*x+c)/d/(a+a*cos(d*x+c))^4-1/35*(16*A-9*B+2*C)*sec(d*x+c)^2*tan(d*x+ c)/a/d/(a+a*cos(d*x+c))^3+4/105*(454*A-216*B+83*C)*tan(d*x+c)^3/a^4/d
Time = 4.72 (sec) , antiderivative size = 304, normalized size of antiderivative = 1.06 \[ \int \frac {\left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^4(c+d x)}{(a+a \cos (c+d x))^4} \, dx=\frac {26880 (44 A-21 B+8 C) \cos ^8\left (\frac {1}{2} (c+d x)\right ) \left (\log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )-\log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )\right )+2 \cos \left (\frac {1}{2} (c+d x)\right ) (217696 A-102504 B+39952 C+14 (28252 A-13353 B+5224 C) \cos (c+d x)+56 (5218 A-2472 B+961 C) \cos (2 (c+d x))+173316 A \cos (3 (c+d x))-82239 B \cos (3 (c+d x))+31832 C \cos (3 (c+d x))+79264 A \cos (4 (c+d x))-37656 B \cos (4 (c+d x))+14528 C \cos (4 (c+d x))+24436 A \cos (5 (c+d x))-11619 B \cos (5 (c+d x))+4472 C \cos (5 (c+d x))+3632 A \cos (6 (c+d x))-1728 B \cos (6 (c+d x))+664 C \cos (6 (c+d x))) \sec ^3(c+d x) \sin \left (\frac {1}{2} (c+d x)\right )}{3360 a^4 d (1+\cos (c+d x))^4} \]
(26880*(44*A - 21*B + 8*C)*Cos[(c + d*x)/2]^8*(Log[Cos[(c + d*x)/2] - Sin[ (c + d*x)/2]] - Log[Cos[(c + d*x)/2] + Sin[(c + d*x)/2]]) + 2*Cos[(c + d*x )/2]*(217696*A - 102504*B + 39952*C + 14*(28252*A - 13353*B + 5224*C)*Cos[ c + d*x] + 56*(5218*A - 2472*B + 961*C)*Cos[2*(c + d*x)] + 173316*A*Cos[3* (c + d*x)] - 82239*B*Cos[3*(c + d*x)] + 31832*C*Cos[3*(c + d*x)] + 79264*A *Cos[4*(c + d*x)] - 37656*B*Cos[4*(c + d*x)] + 14528*C*Cos[4*(c + d*x)] + 24436*A*Cos[5*(c + d*x)] - 11619*B*Cos[5*(c + d*x)] + 4472*C*Cos[5*(c + d* x)] + 3632*A*Cos[6*(c + d*x)] - 1728*B*Cos[6*(c + d*x)] + 664*C*Cos[6*(c + d*x)])*Sec[c + d*x]^3*Sin[(c + d*x)/2])/(3360*a^4*d*(1 + Cos[c + d*x])^4)
Time = 1.89 (sec) , antiderivative size = 287, normalized size of antiderivative = 1.00, number of steps used = 18, number of rules used = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.415, Rules used = {3042, 3520, 3042, 3457, 3042, 3457, 3042, 3457, 27, 3042, 3227, 3042, 4254, 2009, 4255, 3042, 4257}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\sec ^4(c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right )}{(a \cos (c+d x)+a)^4} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {A+B \sin \left (c+d x+\frac {\pi }{2}\right )+C \sin \left (c+d x+\frac {\pi }{2}\right )^2}{\sin \left (c+d x+\frac {\pi }{2}\right )^4 \left (a \sin \left (c+d x+\frac {\pi }{2}\right )+a\right )^4}dx\) |
\(\Big \downarrow \) 3520 |
\(\displaystyle \frac {\int \frac {(a (10 A-3 B+3 C)-a (6 A-6 B-C) \cos (c+d x)) \sec ^4(c+d x)}{(\cos (c+d x) a+a)^3}dx}{7 a^2}-\frac {(A-B+C) \tan (c+d x) \sec ^2(c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {a (10 A-3 B+3 C)-a (6 A-6 B-C) \sin \left (c+d x+\frac {\pi }{2}\right )}{\sin \left (c+d x+\frac {\pi }{2}\right )^4 \left (\sin \left (c+d x+\frac {\pi }{2}\right ) a+a\right )^3}dx}{7 a^2}-\frac {(A-B+C) \tan (c+d x) \sec ^2(c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 3457 |
\(\displaystyle \frac {\frac {\int \frac {\left (7 a^2 (14 A-6 B+3 C)-5 a^2 (16 A-9 B+2 C) \cos (c+d x)\right ) \sec ^4(c+d x)}{(\cos (c+d x) a+a)^2}dx}{5 a^2}-\frac {a (16 A-9 B+2 C) \tan (c+d x) \sec ^2(c+d x)}{5 d (a \cos (c+d x)+a)^3}}{7 a^2}-\frac {(A-B+C) \tan (c+d x) \sec ^2(c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\int \frac {7 a^2 (14 A-6 B+3 C)-5 a^2 (16 A-9 B+2 C) \sin \left (c+d x+\frac {\pi }{2}\right )}{\sin \left (c+d x+\frac {\pi }{2}\right )^4 \left (\sin \left (c+d x+\frac {\pi }{2}\right ) a+a\right )^2}dx}{5 a^2}-\frac {a (16 A-9 B+2 C) \tan (c+d x) \sec ^2(c+d x)}{5 d (a \cos (c+d x)+a)^3}}{7 a^2}-\frac {(A-B+C) \tan (c+d x) \sec ^2(c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 3457 |
\(\displaystyle \frac {\frac {\frac {\int \frac {\left (3 a^3 (276 A-129 B+52 C)-4 a^3 (178 A-87 B+31 C) \cos (c+d x)\right ) \sec ^4(c+d x)}{\cos (c+d x) a+a}dx}{3 a^2}-\frac {(178 A-87 B+31 C) \tan (c+d x) \sec ^2(c+d x)}{3 d (\cos (c+d x)+1)^2}}{5 a^2}-\frac {a (16 A-9 B+2 C) \tan (c+d x) \sec ^2(c+d x)}{5 d (a \cos (c+d x)+a)^3}}{7 a^2}-\frac {(A-B+C) \tan (c+d x) \sec ^2(c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\frac {\int \frac {3 a^3 (276 A-129 B+52 C)-4 a^3 (178 A-87 B+31 C) \sin \left (c+d x+\frac {\pi }{2}\right )}{\sin \left (c+d x+\frac {\pi }{2}\right )^4 \left (\sin \left (c+d x+\frac {\pi }{2}\right ) a+a\right )}dx}{3 a^2}-\frac {(178 A-87 B+31 C) \tan (c+d x) \sec ^2(c+d x)}{3 d (\cos (c+d x)+1)^2}}{5 a^2}-\frac {a (16 A-9 B+2 C) \tan (c+d x) \sec ^2(c+d x)}{5 d (a \cos (c+d x)+a)^3}}{7 a^2}-\frac {(A-B+C) \tan (c+d x) \sec ^2(c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 3457 |
\(\displaystyle \frac {\frac {\frac {\frac {\int 3 \left (4 a^4 (454 A-216 B+83 C)-35 a^4 (44 A-21 B+8 C) \cos (c+d x)\right ) \sec ^4(c+d x)dx}{a^2}-\frac {35 a^3 (44 A-21 B+8 C) \tan (c+d x) \sec ^2(c+d x)}{d (a \cos (c+d x)+a)}}{3 a^2}-\frac {(178 A-87 B+31 C) \tan (c+d x) \sec ^2(c+d x)}{3 d (\cos (c+d x)+1)^2}}{5 a^2}-\frac {a (16 A-9 B+2 C) \tan (c+d x) \sec ^2(c+d x)}{5 d (a \cos (c+d x)+a)^3}}{7 a^2}-\frac {(A-B+C) \tan (c+d x) \sec ^2(c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\frac {\frac {\frac {3 \int \left (4 a^4 (454 A-216 B+83 C)-35 a^4 (44 A-21 B+8 C) \cos (c+d x)\right ) \sec ^4(c+d x)dx}{a^2}-\frac {35 a^3 (44 A-21 B+8 C) \tan (c+d x) \sec ^2(c+d x)}{d (a \cos (c+d x)+a)}}{3 a^2}-\frac {(178 A-87 B+31 C) \tan (c+d x) \sec ^2(c+d x)}{3 d (\cos (c+d x)+1)^2}}{5 a^2}-\frac {a (16 A-9 B+2 C) \tan (c+d x) \sec ^2(c+d x)}{5 d (a \cos (c+d x)+a)^3}}{7 a^2}-\frac {(A-B+C) \tan (c+d x) \sec ^2(c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\frac {\frac {3 \int \frac {4 a^4 (454 A-216 B+83 C)-35 a^4 (44 A-21 B+8 C) \sin \left (c+d x+\frac {\pi }{2}\right )}{\sin \left (c+d x+\frac {\pi }{2}\right )^4}dx}{a^2}-\frac {35 a^3 (44 A-21 B+8 C) \tan (c+d x) \sec ^2(c+d x)}{d (a \cos (c+d x)+a)}}{3 a^2}-\frac {(178 A-87 B+31 C) \tan (c+d x) \sec ^2(c+d x)}{3 d (\cos (c+d x)+1)^2}}{5 a^2}-\frac {a (16 A-9 B+2 C) \tan (c+d x) \sec ^2(c+d x)}{5 d (a \cos (c+d x)+a)^3}}{7 a^2}-\frac {(A-B+C) \tan (c+d x) \sec ^2(c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 3227 |
\(\displaystyle \frac {\frac {\frac {\frac {3 \left (4 a^4 (454 A-216 B+83 C) \int \sec ^4(c+d x)dx-35 a^4 (44 A-21 B+8 C) \int \sec ^3(c+d x)dx\right )}{a^2}-\frac {35 a^3 (44 A-21 B+8 C) \tan (c+d x) \sec ^2(c+d x)}{d (a \cos (c+d x)+a)}}{3 a^2}-\frac {(178 A-87 B+31 C) \tan (c+d x) \sec ^2(c+d x)}{3 d (\cos (c+d x)+1)^2}}{5 a^2}-\frac {a (16 A-9 B+2 C) \tan (c+d x) \sec ^2(c+d x)}{5 d (a \cos (c+d x)+a)^3}}{7 a^2}-\frac {(A-B+C) \tan (c+d x) \sec ^2(c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\frac {\frac {3 \left (4 a^4 (454 A-216 B+83 C) \int \csc \left (c+d x+\frac {\pi }{2}\right )^4dx-35 a^4 (44 A-21 B+8 C) \int \csc \left (c+d x+\frac {\pi }{2}\right )^3dx\right )}{a^2}-\frac {35 a^3 (44 A-21 B+8 C) \tan (c+d x) \sec ^2(c+d x)}{d (a \cos (c+d x)+a)}}{3 a^2}-\frac {(178 A-87 B+31 C) \tan (c+d x) \sec ^2(c+d x)}{3 d (\cos (c+d x)+1)^2}}{5 a^2}-\frac {a (16 A-9 B+2 C) \tan (c+d x) \sec ^2(c+d x)}{5 d (a \cos (c+d x)+a)^3}}{7 a^2}-\frac {(A-B+C) \tan (c+d x) \sec ^2(c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 4254 |
\(\displaystyle \frac {\frac {\frac {\frac {3 \left (-\frac {4 a^4 (454 A-216 B+83 C) \int \left (\tan ^2(c+d x)+1\right )d(-\tan (c+d x))}{d}-35 a^4 (44 A-21 B+8 C) \int \csc \left (c+d x+\frac {\pi }{2}\right )^3dx\right )}{a^2}-\frac {35 a^3 (44 A-21 B+8 C) \tan (c+d x) \sec ^2(c+d x)}{d (a \cos (c+d x)+a)}}{3 a^2}-\frac {(178 A-87 B+31 C) \tan (c+d x) \sec ^2(c+d x)}{3 d (\cos (c+d x)+1)^2}}{5 a^2}-\frac {a (16 A-9 B+2 C) \tan (c+d x) \sec ^2(c+d x)}{5 d (a \cos (c+d x)+a)^3}}{7 a^2}-\frac {(A-B+C) \tan (c+d x) \sec ^2(c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {\frac {\frac {\frac {3 \left (-35 a^4 (44 A-21 B+8 C) \int \csc \left (c+d x+\frac {\pi }{2}\right )^3dx-\frac {4 a^4 (454 A-216 B+83 C) \left (-\frac {1}{3} \tan ^3(c+d x)-\tan (c+d x)\right )}{d}\right )}{a^2}-\frac {35 a^3 (44 A-21 B+8 C) \tan (c+d x) \sec ^2(c+d x)}{d (a \cos (c+d x)+a)}}{3 a^2}-\frac {(178 A-87 B+31 C) \tan (c+d x) \sec ^2(c+d x)}{3 d (\cos (c+d x)+1)^2}}{5 a^2}-\frac {a (16 A-9 B+2 C) \tan (c+d x) \sec ^2(c+d x)}{5 d (a \cos (c+d x)+a)^3}}{7 a^2}-\frac {(A-B+C) \tan (c+d x) \sec ^2(c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 4255 |
\(\displaystyle \frac {\frac {\frac {\frac {3 \left (-35 a^4 (44 A-21 B+8 C) \left (\frac {1}{2} \int \sec (c+d x)dx+\frac {\tan (c+d x) \sec (c+d x)}{2 d}\right )-\frac {4 a^4 (454 A-216 B+83 C) \left (-\frac {1}{3} \tan ^3(c+d x)-\tan (c+d x)\right )}{d}\right )}{a^2}-\frac {35 a^3 (44 A-21 B+8 C) \tan (c+d x) \sec ^2(c+d x)}{d (a \cos (c+d x)+a)}}{3 a^2}-\frac {(178 A-87 B+31 C) \tan (c+d x) \sec ^2(c+d x)}{3 d (\cos (c+d x)+1)^2}}{5 a^2}-\frac {a (16 A-9 B+2 C) \tan (c+d x) \sec ^2(c+d x)}{5 d (a \cos (c+d x)+a)^3}}{7 a^2}-\frac {(A-B+C) \tan (c+d x) \sec ^2(c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\frac {\frac {3 \left (-35 a^4 (44 A-21 B+8 C) \left (\frac {1}{2} \int \csc \left (c+d x+\frac {\pi }{2}\right )dx+\frac {\tan (c+d x) \sec (c+d x)}{2 d}\right )-\frac {4 a^4 (454 A-216 B+83 C) \left (-\frac {1}{3} \tan ^3(c+d x)-\tan (c+d x)\right )}{d}\right )}{a^2}-\frac {35 a^3 (44 A-21 B+8 C) \tan (c+d x) \sec ^2(c+d x)}{d (a \cos (c+d x)+a)}}{3 a^2}-\frac {(178 A-87 B+31 C) \tan (c+d x) \sec ^2(c+d x)}{3 d (\cos (c+d x)+1)^2}}{5 a^2}-\frac {a (16 A-9 B+2 C) \tan (c+d x) \sec ^2(c+d x)}{5 d (a \cos (c+d x)+a)^3}}{7 a^2}-\frac {(A-B+C) \tan (c+d x) \sec ^2(c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle \frac {\frac {\frac {\frac {3 \left (-35 a^4 (44 A-21 B+8 C) \left (\frac {\text {arctanh}(\sin (c+d x))}{2 d}+\frac {\tan (c+d x) \sec (c+d x)}{2 d}\right )-\frac {4 a^4 (454 A-216 B+83 C) \left (-\frac {1}{3} \tan ^3(c+d x)-\tan (c+d x)\right )}{d}\right )}{a^2}-\frac {35 a^3 (44 A-21 B+8 C) \tan (c+d x) \sec ^2(c+d x)}{d (a \cos (c+d x)+a)}}{3 a^2}-\frac {(178 A-87 B+31 C) \tan (c+d x) \sec ^2(c+d x)}{3 d (\cos (c+d x)+1)^2}}{5 a^2}-\frac {a (16 A-9 B+2 C) \tan (c+d x) \sec ^2(c+d x)}{5 d (a \cos (c+d x)+a)^3}}{7 a^2}-\frac {(A-B+C) \tan (c+d x) \sec ^2(c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
-1/7*((A - B + C)*Sec[c + d*x]^2*Tan[c + d*x])/(d*(a + a*Cos[c + d*x])^4) + (-1/5*(a*(16*A - 9*B + 2*C)*Sec[c + d*x]^2*Tan[c + d*x])/(d*(a + a*Cos[c + d*x])^3) + (-1/3*((178*A - 87*B + 31*C)*Sec[c + d*x]^2*Tan[c + d*x])/(d *(1 + Cos[c + d*x])^2) + ((-35*a^3*(44*A - 21*B + 8*C)*Sec[c + d*x]^2*Tan[ c + d*x])/(d*(a + a*Cos[c + d*x])) + (3*(-35*a^4*(44*A - 21*B + 8*C)*(ArcT anh[Sin[c + d*x]]/(2*d) + (Sec[c + d*x]*Tan[c + d*x])/(2*d)) - (4*a^4*(454 *A - 216*B + 83*C)*(-Tan[c + d*x] - Tan[c + d*x]^3/3))/d))/a^2)/(3*a^2))/( 5*a^2))/(7*a^2)
3.4.72.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x _)]), x_Symbol] :> Simp[c Int[(b*Sin[e + f*x])^m, x], x] + Simp[d/b Int [(b*Sin[e + f*x])^(m + 1), x], x] /; FreeQ[{b, c, d, e, f, m}, x]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Sim p[b*(A*b - a*B)*Cos[e + f*x]*(a + b*Sin[e + f*x])^m*((c + d*Sin[e + f*x])^( n + 1)/(a*f*(2*m + 1)*(b*c - a*d))), x] + Simp[1/(a*(2*m + 1)*(b*c - a*d)) Int[(a + b*Sin[e + f*x])^(m + 1)*(c + d*Sin[e + f*x])^n*Simp[B*(a*c*m + b *d*(n + 1)) + A*(b*c*(m + 1) - a*d*(2*m + n + 2)) + d*(A*b - a*B)*(m + n + 2)*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, n}, x] && NeQ [b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && LtQ[m, -2^(-1)] && !GtQ[n, 0] && IntegerQ[2*m] && (IntegerQ[2*n] || EqQ[c, 0])
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(a*A - b*B + a*C)*Cos[e + f*x]*(a + b* Sin[e + f*x])^m*((c + d*Sin[e + f*x])^(n + 1)/(f*(b*c - a*d)*(2*m + 1))), x ] + Simp[1/(b*(b*c - a*d)*(2*m + 1)) Int[(a + b*Sin[e + f*x])^(m + 1)*(c + d*Sin[e + f*x])^n*Simp[A*(a*c*(m + 1) - b*d*(2*m + n + 2)) + B*(b*c*m + a *d*(n + 1)) - C*(a*c*m + b*d*(n + 1)) + (d*(a*A - b*B)*(m + n + 2) + C*(b*c *(2*m + 1) - a*d*(m - n - 1)))*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, C, n}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c ^2 - d^2, 0] && LtQ[m, -2^(-1)]
Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Simp[-d^(-1) Subst[Int[Exp andIntegrand[(1 + x^2)^(n/2 - 1), x], x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]
Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d* x]*((b*Csc[c + d*x])^(n - 1)/(d*(n - 1))), x] + Simp[b^2*((n - 2)/(n - 1)) Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && IntegerQ[2*n]
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Time = 2.87 (sec) , antiderivative size = 257, normalized size of antiderivative = 0.90
method | result | size |
parallelrisch | \(\frac {147840 \left (A -\frac {21 B}{44}+\frac {2 C}{11}\right ) \left (\cos \left (3 d x +3 c \right )+3 \cos \left (d x +c \right )\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )-147840 \left (A -\frac {21 B}{44}+\frac {2 C}{11}\right ) \left (\cos \left (3 d x +3 c \right )+3 \cos \left (d x +c \right )\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+173316 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (\left (A -\frac {27413 B}{57772}+\frac {7958 C}{43329}\right ) \cos \left (3 d x +3 c \right )+\left (\frac {73052 A}{43329}-\frac {11536 B}{14443}+\frac {13454 C}{43329}\right ) \cos \left (2 d x +2 c \right )+\left (\frac {19816 A}{43329}-\frac {3138 B}{14443}+\frac {3632 C}{43329}\right ) \cos \left (4 d x +4 c \right )+\left (\frac {6109 A}{43329}-\frac {3873 B}{57772}+\frac {86 C}{3333}\right ) \cos \left (5 d x +5 c \right )+\left (\frac {908 A}{43329}-\frac {144 B}{14443}+\frac {166 C}{43329}\right ) \cos \left (6 d x +6 c \right )+\left (\frac {98882 A}{43329}-\frac {31157 B}{28886}+\frac {18284 C}{43329}\right ) \cos \left (d x +c \right )+\frac {54424 A}{43329}-\frac {8542 B}{14443}+\frac {908 C}{3939}\right ) \left (\sec ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{6720 d \,a^{4} \left (\cos \left (3 d x +3 c \right )+3 \cos \left (d x +c \right )\right )}\) | \(257\) |
derivativedivides | \(\frac {\frac {\left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) A}{7}-\frac {\left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) B}{7}+\frac {\left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) C}{7}+\frac {11 A \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{5}-\frac {9 \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) B}{5}+\frac {7 \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) C}{5}+\frac {59 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) A}{3}-13 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) B +\frac {23 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) C}{3}+209 A \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-111 B \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+49 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) C -\frac {40 A -8 B}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}-\frac {104 A -36 B +8 C}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1}+\left (176 A -84 B +32 C \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )-\frac {8 A}{3 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}-\frac {-40 A +8 B}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}+\left (-176 A +84 B -32 C \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )-\frac {104 A -36 B +8 C}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}-\frac {8 A}{3 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}}{8 d \,a^{4}}\) | \(344\) |
default | \(\frac {\frac {\left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) A}{7}-\frac {\left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) B}{7}+\frac {\left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) C}{7}+\frac {11 A \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{5}-\frac {9 \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) B}{5}+\frac {7 \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) C}{5}+\frac {59 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) A}{3}-13 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) B +\frac {23 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) C}{3}+209 A \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-111 B \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+49 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) C -\frac {40 A -8 B}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}-\frac {104 A -36 B +8 C}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1}+\left (176 A -84 B +32 C \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )-\frac {8 A}{3 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}-\frac {-40 A +8 B}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}+\left (-176 A +84 B -32 C \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )-\frac {104 A -36 B +8 C}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}-\frac {8 A}{3 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}}{8 d \,a^{4}}\) | \(344\) |
risch | \(\frac {i \left (430584 A \,{\mathrm e}^{8 i \left (d x +c \right )}+1328 C +7264 A -3456 B +485724 A \,{\mathrm e}^{4 i \left (d x +c \right )}-230721 B \,{\mathrm e}^{4 i \left (d x +c \right )}-67509 B \,{\mathrm e}^{2 i \left (d x +c \right )}+89048 C \,{\mathrm e}^{4 i \left (d x +c \right )}+25992 C \,{\mathrm e}^{2 i \left (d x +c \right )}-286062 B \,{\mathrm e}^{7 i \left (d x +c \right )}+297444 A \,{\mathrm e}^{3 i \left (d x +c \right )}+637224 A \,{\mathrm e}^{5 i \left (d x +c \right )}-302526 B \,{\mathrm e}^{5 i \left (d x +c \right )}-2205 B \,{\mathrm e}^{12 i \left (d x +c \right )}+4620 A \,{\mathrm e}^{12 i \left (d x +c \right )}+840 C \,{\mathrm e}^{12 i \left (d x +c \right )}+141996 A \,{\mathrm e}^{2 i \left (d x +c \right )}+46228 A \,{\mathrm e}^{i \left (d x +c \right )}-21987 B \,{\mathrm e}^{i \left (d x +c \right )}-322194 B \,{\mathrm e}^{6 i \left (d x +c \right )}-141351 B \,{\mathrm e}^{3 i \left (d x +c \right )}+679096 A \,{\mathrm e}^{6 i \left (d x +c \right )}+123632 C \,{\mathrm e}^{6 i \left (d x +c \right )}-52185 B \,{\mathrm e}^{10 i \left (d x +c \right )}+109340 A \,{\mathrm e}^{10 i \left (d x +c \right )}+599368 A \,{\mathrm e}^{7 i \left (d x +c \right )}+8456 C \,{\mathrm e}^{i \left (d x +c \right )}-205506 B \,{\mathrm e}^{8 i \left (d x +c \right )}+110096 C \,{\mathrm e}^{7 i \left (d x +c \right )}+116928 C \,{\mathrm e}^{5 i \left (d x +c \right )}+54488 C \,{\mathrm e}^{3 i \left (d x +c \right )}-15435 B \,{\mathrm e}^{11 i \left (d x +c \right )}+32340 A \,{\mathrm e}^{11 i \left (d x +c \right )}+5880 C \,{\mathrm e}^{11 i \left (d x +c \right )}+19880 C \,{\mathrm e}^{10 i \left (d x +c \right )}+78288 C \,{\mathrm e}^{8 i \left (d x +c \right )}+45080 C \,{\mathrm e}^{9 i \left (d x +c \right )}+247940 A \,{\mathrm e}^{9 i \left (d x +c \right )}-118335 B \,{\mathrm e}^{9 i \left (d x +c \right )}\right )}{105 d \,a^{4} \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )^{7} \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{3}}-\frac {22 A \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{a^{4} d}+\frac {21 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) B}{2 a^{4} d}-\frac {4 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) C}{a^{4} d}+\frac {22 A \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{a^{4} d}-\frac {21 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) B}{2 a^{4} d}+\frac {4 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) C}{a^{4} d}\) | \(611\) |
1/6720*(147840*(A-21/44*B+2/11*C)*(cos(3*d*x+3*c)+3*cos(d*x+c))*ln(tan(1/2 *d*x+1/2*c)-1)-147840*(A-21/44*B+2/11*C)*(cos(3*d*x+3*c)+3*cos(d*x+c))*ln( tan(1/2*d*x+1/2*c)+1)+173316*tan(1/2*d*x+1/2*c)*((A-27413/57772*B+7958/433 29*C)*cos(3*d*x+3*c)+(73052/43329*A-11536/14443*B+13454/43329*C)*cos(2*d*x +2*c)+(19816/43329*A-3138/14443*B+3632/43329*C)*cos(4*d*x+4*c)+(6109/43329 *A-3873/57772*B+86/3333*C)*cos(5*d*x+5*c)+(908/43329*A-144/14443*B+166/433 29*C)*cos(6*d*x+6*c)+(98882/43329*A-31157/28886*B+18284/43329*C)*cos(d*x+c )+54424/43329*A-8542/14443*B+908/3939*C)*sec(1/2*d*x+1/2*c)^6)/d/a^4/(cos( 3*d*x+3*c)+3*cos(d*x+c))
Time = 0.28 (sec) , antiderivative size = 422, normalized size of antiderivative = 1.47 \[ \int \frac {\left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^4(c+d x)}{(a+a \cos (c+d x))^4} \, dx=-\frac {105 \, {\left ({\left (44 \, A - 21 \, B + 8 \, C\right )} \cos \left (d x + c\right )^{7} + 4 \, {\left (44 \, A - 21 \, B + 8 \, C\right )} \cos \left (d x + c\right )^{6} + 6 \, {\left (44 \, A - 21 \, B + 8 \, C\right )} \cos \left (d x + c\right )^{5} + 4 \, {\left (44 \, A - 21 \, B + 8 \, C\right )} \cos \left (d x + c\right )^{4} + {\left (44 \, A - 21 \, B + 8 \, C\right )} \cos \left (d x + c\right )^{3}\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - 105 \, {\left ({\left (44 \, A - 21 \, B + 8 \, C\right )} \cos \left (d x + c\right )^{7} + 4 \, {\left (44 \, A - 21 \, B + 8 \, C\right )} \cos \left (d x + c\right )^{6} + 6 \, {\left (44 \, A - 21 \, B + 8 \, C\right )} \cos \left (d x + c\right )^{5} + 4 \, {\left (44 \, A - 21 \, B + 8 \, C\right )} \cos \left (d x + c\right )^{4} + {\left (44 \, A - 21 \, B + 8 \, C\right )} \cos \left (d x + c\right )^{3}\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 2 \, {\left (16 \, {\left (454 \, A - 216 \, B + 83 \, C\right )} \cos \left (d x + c\right )^{6} + {\left (24436 \, A - 11619 \, B + 4472 \, C\right )} \cos \left (d x + c\right )^{5} + 4 \, {\left (7184 \, A - 3411 \, B + 1318 \, C\right )} \cos \left (d x + c\right )^{4} + 4 \, {\left (3196 \, A - 1509 \, B + 592 \, C\right )} \cos \left (d x + c\right )^{3} + 70 \, {\left (14 \, A - 6 \, B + 3 \, C\right )} \cos \left (d x + c\right )^{2} - 35 \, {\left (4 \, A - 3 \, B\right )} \cos \left (d x + c\right ) + 70 \, A\right )} \sin \left (d x + c\right )}{420 \, {\left (a^{4} d \cos \left (d x + c\right )^{7} + 4 \, a^{4} d \cos \left (d x + c\right )^{6} + 6 \, a^{4} d \cos \left (d x + c\right )^{5} + 4 \, a^{4} d \cos \left (d x + c\right )^{4} + a^{4} d \cos \left (d x + c\right )^{3}\right )}} \]
integrate((A+B*cos(d*x+c)+C*cos(d*x+c)^2)*sec(d*x+c)^4/(a+a*cos(d*x+c))^4, x, algorithm="fricas")
-1/420*(105*((44*A - 21*B + 8*C)*cos(d*x + c)^7 + 4*(44*A - 21*B + 8*C)*co s(d*x + c)^6 + 6*(44*A - 21*B + 8*C)*cos(d*x + c)^5 + 4*(44*A - 21*B + 8*C )*cos(d*x + c)^4 + (44*A - 21*B + 8*C)*cos(d*x + c)^3)*log(sin(d*x + c) + 1) - 105*((44*A - 21*B + 8*C)*cos(d*x + c)^7 + 4*(44*A - 21*B + 8*C)*cos(d *x + c)^6 + 6*(44*A - 21*B + 8*C)*cos(d*x + c)^5 + 4*(44*A - 21*B + 8*C)*c os(d*x + c)^4 + (44*A - 21*B + 8*C)*cos(d*x + c)^3)*log(-sin(d*x + c) + 1) - 2*(16*(454*A - 216*B + 83*C)*cos(d*x + c)^6 + (24436*A - 11619*B + 4472 *C)*cos(d*x + c)^5 + 4*(7184*A - 3411*B + 1318*C)*cos(d*x + c)^4 + 4*(3196 *A - 1509*B + 592*C)*cos(d*x + c)^3 + 70*(14*A - 6*B + 3*C)*cos(d*x + c)^2 - 35*(4*A - 3*B)*cos(d*x + c) + 70*A)*sin(d*x + c))/(a^4*d*cos(d*x + c)^7 + 4*a^4*d*cos(d*x + c)^6 + 6*a^4*d*cos(d*x + c)^5 + 4*a^4*d*cos(d*x + c)^ 4 + a^4*d*cos(d*x + c)^3)
Timed out. \[ \int \frac {\left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^4(c+d x)}{(a+a \cos (c+d x))^4} \, dx=\text {Timed out} \]
Leaf count of result is larger than twice the leaf count of optimal. 690 vs. \(2 (271) = 542\).
Time = 0.23 (sec) , antiderivative size = 690, normalized size of antiderivative = 2.40 \[ \int \frac {\left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^4(c+d x)}{(a+a \cos (c+d x))^4} \, dx=\frac {A {\left (\frac {560 \, {\left (\frac {27 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {62 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {39 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}}\right )}}{a^{4} - \frac {3 \, a^{4} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {3 \, a^{4} \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} - \frac {a^{4} \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}}} + \frac {\frac {21945 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {2065 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {231 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} + \frac {15 \, \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}}}{a^{4}} - \frac {18480 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{a^{4}} + \frac {18480 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{a^{4}}\right )} - 3 \, B {\left (\frac {280 \, {\left (\frac {7 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {9 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}\right )}}{a^{4} - \frac {2 \, a^{4} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {a^{4} \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}}} + \frac {\frac {3885 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {455 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {63 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} + \frac {5 \, \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}}}{a^{4}} - \frac {2940 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{a^{4}} + \frac {2940 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{a^{4}}\right )} + C {\left (\frac {1680 \, \sin \left (d x + c\right )}{{\left (a^{4} - \frac {a^{4} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}\right )} {\left (\cos \left (d x + c\right ) + 1\right )}} + \frac {\frac {5145 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {805 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {147 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} + \frac {15 \, \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}}}{a^{4}} - \frac {3360 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{a^{4}} + \frac {3360 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{a^{4}}\right )}}{840 \, d} \]
integrate((A+B*cos(d*x+c)+C*cos(d*x+c)^2)*sec(d*x+c)^4/(a+a*cos(d*x+c))^4, x, algorithm="maxima")
1/840*(A*(560*(27*sin(d*x + c)/(cos(d*x + c) + 1) - 62*sin(d*x + c)^3/(cos (d*x + c) + 1)^3 + 39*sin(d*x + c)^5/(cos(d*x + c) + 1)^5)/(a^4 - 3*a^4*si n(d*x + c)^2/(cos(d*x + c) + 1)^2 + 3*a^4*sin(d*x + c)^4/(cos(d*x + c) + 1 )^4 - a^4*sin(d*x + c)^6/(cos(d*x + c) + 1)^6) + (21945*sin(d*x + c)/(cos( d*x + c) + 1) + 2065*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 + 231*sin(d*x + c )^5/(cos(d*x + c) + 1)^5 + 15*sin(d*x + c)^7/(cos(d*x + c) + 1)^7)/a^4 - 1 8480*log(sin(d*x + c)/(cos(d*x + c) + 1) + 1)/a^4 + 18480*log(sin(d*x + c) /(cos(d*x + c) + 1) - 1)/a^4) - 3*B*(280*(7*sin(d*x + c)/(cos(d*x + c) + 1 ) - 9*sin(d*x + c)^3/(cos(d*x + c) + 1)^3)/(a^4 - 2*a^4*sin(d*x + c)^2/(co s(d*x + c) + 1)^2 + a^4*sin(d*x + c)^4/(cos(d*x + c) + 1)^4) + (3885*sin(d *x + c)/(cos(d*x + c) + 1) + 455*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 + 63* sin(d*x + c)^5/(cos(d*x + c) + 1)^5 + 5*sin(d*x + c)^7/(cos(d*x + c) + 1)^ 7)/a^4 - 2940*log(sin(d*x + c)/(cos(d*x + c) + 1) + 1)/a^4 + 2940*log(sin( d*x + c)/(cos(d*x + c) + 1) - 1)/a^4) + C*(1680*sin(d*x + c)/((a^4 - a^4*s in(d*x + c)^2/(cos(d*x + c) + 1)^2)*(cos(d*x + c) + 1)) + (5145*sin(d*x + c)/(cos(d*x + c) + 1) + 805*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 + 147*sin( d*x + c)^5/(cos(d*x + c) + 1)^5 + 15*sin(d*x + c)^7/(cos(d*x + c) + 1)^7)/ a^4 - 3360*log(sin(d*x + c)/(cos(d*x + c) + 1) + 1)/a^4 + 3360*log(sin(d*x + c)/(cos(d*x + c) + 1) - 1)/a^4))/d
Time = 0.40 (sec) , antiderivative size = 407, normalized size of antiderivative = 1.42 \[ \int \frac {\left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^4(c+d x)}{(a+a \cos (c+d x))^4} \, dx=-\frac {\frac {420 \, {\left (44 \, A - 21 \, B + 8 \, C\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right )}{a^{4}} - \frac {420 \, {\left (44 \, A - 21 \, B + 8 \, C\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right )}{a^{4}} + \frac {280 \, {\left (78 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 27 \, B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 6 \, C \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 124 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 48 \, B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 12 \, C \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 54 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 21 \, B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 6 \, C \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{3} a^{4}} - \frac {15 \, A a^{24} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 15 \, B a^{24} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 15 \, C a^{24} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 231 \, A a^{24} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 189 \, B a^{24} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 147 \, C a^{24} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 2065 \, A a^{24} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 1365 \, B a^{24} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 805 \, C a^{24} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 21945 \, A a^{24} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 11655 \, B a^{24} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 5145 \, C a^{24} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{28}}}{840 \, d} \]
integrate((A+B*cos(d*x+c)+C*cos(d*x+c)^2)*sec(d*x+c)^4/(a+a*cos(d*x+c))^4, x, algorithm="giac")
-1/840*(420*(44*A - 21*B + 8*C)*log(abs(tan(1/2*d*x + 1/2*c) + 1))/a^4 - 4 20*(44*A - 21*B + 8*C)*log(abs(tan(1/2*d*x + 1/2*c) - 1))/a^4 + 280*(78*A* tan(1/2*d*x + 1/2*c)^5 - 27*B*tan(1/2*d*x + 1/2*c)^5 + 6*C*tan(1/2*d*x + 1 /2*c)^5 - 124*A*tan(1/2*d*x + 1/2*c)^3 + 48*B*tan(1/2*d*x + 1/2*c)^3 - 12* C*tan(1/2*d*x + 1/2*c)^3 + 54*A*tan(1/2*d*x + 1/2*c) - 21*B*tan(1/2*d*x + 1/2*c) + 6*C*tan(1/2*d*x + 1/2*c))/((tan(1/2*d*x + 1/2*c)^2 - 1)^3*a^4) - (15*A*a^24*tan(1/2*d*x + 1/2*c)^7 - 15*B*a^24*tan(1/2*d*x + 1/2*c)^7 + 15* C*a^24*tan(1/2*d*x + 1/2*c)^7 + 231*A*a^24*tan(1/2*d*x + 1/2*c)^5 - 189*B* a^24*tan(1/2*d*x + 1/2*c)^5 + 147*C*a^24*tan(1/2*d*x + 1/2*c)^5 + 2065*A*a ^24*tan(1/2*d*x + 1/2*c)^3 - 1365*B*a^24*tan(1/2*d*x + 1/2*c)^3 + 805*C*a^ 24*tan(1/2*d*x + 1/2*c)^3 + 21945*A*a^24*tan(1/2*d*x + 1/2*c) - 11655*B*a^ 24*tan(1/2*d*x + 1/2*c) + 5145*C*a^24*tan(1/2*d*x + 1/2*c))/a^28)/d
Time = 1.45 (sec) , antiderivative size = 345, normalized size of antiderivative = 1.20 \[ \int \frac {\left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^4(c+d x)}{(a+a \cos (c+d x))^4} \, dx=\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,\left (\frac {7\,A-5\,B+3\,C}{40\,a^4}+\frac {A-B+C}{10\,a^4}\right )}{d}-\frac {\left (26\,A-9\,B+2\,C\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+\left (16\,B-\frac {124\,A}{3}-4\,C\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\left (18\,A-7\,B+2\,C\right )\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left (a^4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6-3\,a^4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+3\,a^4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-a^4\right )}+\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (\frac {21\,A-9\,B+C}{24\,a^4}+\frac {7\,A-5\,B+3\,C}{6\,a^4}+\frac {5\,\left (A-B+C\right )}{12\,a^4}\right )}{d}+\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (\frac {21\,A-9\,B+C}{2\,a^4}+\frac {5\,\left (7\,A-5\,B+3\,C\right )}{4\,a^4}-\frac {5\,B-35\,A+5\,C}{8\,a^4}+\frac {5\,\left (A-B+C\right )}{2\,a^4}\right )}{d}-\frac {\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )\,\left (44\,A-21\,B+8\,C\right )}{a^4\,d}+\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7\,\left (A-B+C\right )}{56\,a^4\,d} \]
(tan(c/2 + (d*x)/2)^5*((7*A - 5*B + 3*C)/(40*a^4) + (A - B + C)/(10*a^4))) /d - (tan(c/2 + (d*x)/2)*(18*A - 7*B + 2*C) + tan(c/2 + (d*x)/2)^5*(26*A - 9*B + 2*C) - tan(c/2 + (d*x)/2)^3*((124*A)/3 - 16*B + 4*C))/(d*(3*a^4*tan (c/2 + (d*x)/2)^2 - 3*a^4*tan(c/2 + (d*x)/2)^4 + a^4*tan(c/2 + (d*x)/2)^6 - a^4)) + (tan(c/2 + (d*x)/2)^3*((21*A - 9*B + C)/(24*a^4) + (7*A - 5*B + 3*C)/(6*a^4) + (5*(A - B + C))/(12*a^4)))/d + (tan(c/2 + (d*x)/2)*((21*A - 9*B + C)/(2*a^4) + (5*(7*A - 5*B + 3*C))/(4*a^4) - (5*B - 35*A + 5*C)/(8* a^4) + (5*(A - B + C))/(2*a^4)))/d - (atanh(tan(c/2 + (d*x)/2))*(44*A - 21 *B + 8*C))/(a^4*d) + (tan(c/2 + (d*x)/2)^7*(A - B + C))/(56*a^4*d)